﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="UpdateVSPackageRegistryFragment" xmlns="http://schemas.microsoft.com/pag/gax-core"
                               xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <xi:include href="../Common/CommonTypeAliases.xml"
				xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Update VS Package Registry Fragment</Caption>
  <Description>Update VS Package Registry Fragment</Description>
  <HostData>
    <Icon File="Resources\Registry.ico" />
    <CommandBar Menu="VSSDKAssistProject"/>
  </HostData>
  <Arguments>
    <xi:include href="../Common/CommonArguments.xml"
					  xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="VSPackageProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true"/>
    <Argument Name="SetupProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.CurrentlySelectedProjectValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="RegistrationMethod" Type="Microsoft.VisualStudio.Shell.RegistrationMethod, Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.DefaultRegistrationMethodValueProvider, VSSDKAssist"
               Stage="OnBeginRecipe"/>
    </Argument>    
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page
              Height="200" Width="510">
          <Title>Specify VS Package registration properties</Title>
          <LinkTitle>VS Package registration properties</LinkTitle>
          <Fields>
            <Field ValueName="VSPackageProject" Label="VS Package project">
              <Editor Type="Microsoft.Practices.RecipeFramework.Library.Editors.SolutionPickerEditor, Microsoft.Practices.RecipeFramework.Library" />
            </Field>
            <Field ValueName="RegistrationMethod" Label="Registration method" />
          </Fields>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions CoordinatorServiceType="VSSDKAssist.Recipes.Common.Coordinators.ExecutionProgressCoordinator, VSSDKAssist">
    <!--Compile project-->
    <Action Name="CompileProject"
          Type="VSSDKAssist.Assets.Actions.VisualStudio.CompileProjectAction, VSSDKAssist.Assets"
          StatusMessage="Compiling project"
          WriteMessageToOutputWindow="true">
      <Input Name="Project" RecipeArgument="VSPackageProject"/>
    </Action>
    <Action Name="GeneratePackageRegistryWxi"
            Type="VSSDKAssist.Recipes.Common.Actions.CreatePackageRegistryFragment, VSSDKAssist"
            StatusMessage="Creating wix fragment"
            WriteMessageToOutputWindow="true">
      <Input Name="Project" RecipeArgument="VSPackageProject"/>
      <Input Name="RegistrationMethod" RecipeArgument="RegistrationMethod"/>
      <Output Name="FragmentContent"/>
    </Action>
    <Action Name="AddPackageRegistryWxi"
            Type="VSSDKAssist.Assets.Actions.VisualStudio.AddItemFromStringAction, VSSDKAssist.Assets"
            TargetFileName="PackageRegistry.wxi"
            Open="false">
      <Input Name="Project" RecipeArgument="SetupProject"/>
      <Input Name="Content" ActionOutput="GeneratePackageRegistryWxi.FragmentContent"/>
      <Output Name="ProjectItem"/>
    </Action>    
  </Actions>
</Recipe>